import { post } from "../utils/request";
var app = getApp();
export const login = (params) => {
  return post('https://alimi.xiaozubao.net/api/app/userCenter/login ', params);
};

//   获取平台基本信息
export const getPlatform = (params) => {
  return post('https://alimi.xiaozubao.net/api/app/homePage/getPlatform ', params);
};
//   获取所以地区码
export const getArea = (params) => {
  return post('https://alimi.xiaozubao.net/api/app/homePage/getArea ', params);
};


//   领券中心
export const getCouponCenterList = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/getCouponCenterList', params);
};

//   获取用户地址
export const getUserAddressList = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/getUserAddressList', params);
};

//   获取实名认证数据
export const getUserCertify = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/getUserCertify', params);
};

//   获取个人所有优惠券
export const getUserCouponList = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/getUserCouponList', params);
};

//   获取用户信息
export const getUserInfo = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/getUserInfo', params);
};
//   修改新增用户地址
export const setUserAddress = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/setUserAddress', params);
};

//保存实名认证结果
export const setUserCertify = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/setUserCertify', params);
};

//产品建议
export const setUserIdea = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/setUserIdea', params);
};

//保存用户信息
export const setUserInfo = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/setUserInfo', params);
};


//领取优惠券
export const setUserCoupon  = (params) => {
  return post(getApp().globalData.apiUrl + 'userCenter/setUserCoupon ', params);
};

